import { Column, PrimaryGeneratedColumn } from "typeorm";
import { EntityModel } from "@midwayjs/orm";

@EntityModel("photo", { schema: "simfeng" })
export class Photo {
  @PrimaryGeneratedColumn({ type: "int", name: "id" })
  id: number;

  @Column("varchar", { name: "name", length: 100 })
  name: string;

  @Column("text", { name: "description" })
  description: string;

  @Column("varchar", { name: "filename", length: 255 })
  filename: string;

  @Column("double", { name: "views", precision: 22 })
  views: number;

  @Column("tinyint", { name: "isPublished" })
  isPublished: number;
}
